<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
</head>
<body>
    用户列表

    <table>
        <thead>
        <tr>
            <td>id</td>
            <td>用户名</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody id="tb">

        </tbody>
    </table>

    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            //调用
            userList() ;

            //获取用户列表
            function userList() {
                $.ajax({
                    type: "post",
                    url: "http://116.63.165.189:8066/user/userList",
                    data: "",
                    dataType: "json",
                    success: function(result) {

                        var resultStr = "" ;

                        for(var i = 0 ; i < result.length; i++) {
                            var user = result[i] ;

                            resultStr += "<tr>" ;
                            resultStr += "<td>"+user.id+"</td>" ;
                            resultStr += "<td>"+user.password+"</td>" ;
                            resultStr += "<td><a href='xxx?id="+user.id+"'>修改</a></td>" ;
                            resultStr += "</tr>" ;
                        }

                        $("#tb").html(resultStr) ;
                    }
                })
            }
        })
    </script>
</body>
</html>